<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <h1>选择Excel文件导入到数据中</h1>
            <form th:action="@{/user/import}" method="post" enctype="multipart/form-data" class="form-inline">
                <div class="form-group">
                    <input class="form-control" type="file" name="excelFile">
                    <input type="submit" class="btn btn-danger" value="导入数据">
                </div>
            </form>
        </div>
        <div class="col-md-12">
            <h1>显示导入数据列表</h1>
            <table class="table table-bordered">
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>生日</th>
                    <th>身份证号码</th>
                    <th>籍贯</th>
                </tr>
                <tr th:each="user:${users}">
                    <td th:text="${user.id}">1</td>
                    <td th:text="${user.name}"> 小陈</td>
                    <td th:text="${#dates.format(user.bir,'yyyy-MM-dd')}">23</td>
                    <td th:text="${user.no}"></td>
                    <td th:text="${user.address}"></td>
                </tr>

            </table>
            <hr>
            <a th:href="@{/user/export}" class="btn btn-info" >导出excel</a>
        </div>
    </div>
</div>
</body>
</html>